Auto merge of #4234 - michaelwoerister:smarter-cargo-incremental-2, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 29 Jun 2017 01:01:27 +0000 (01:01 +0000)
committerbors <bors@rust-lang.org>
Thu, 29 Jun 2017 01:01:27 +0000 (01:01 +0000)
commit5e023a6d7bce13a0522fc189d7bc964178b36d83
tree17d48d4f6b746530aec7122d5ac19439671f92ee
parent64c3217eb459da25df9f9a9818b7775b4387ae8c
parent3d19b89c9d68bc7e405a2011f75501df4bb38e84
Auto merge of #4234 - michaelwoerister:smarter-cargo-incremental-2, r=alexcrichton

Set -Ccodegen-units=N for non-path dependencies when CARGO_INCREMENTAL is set.

This PR tweaks compilation for non-path dependencies when CARGO_INCREMENTAL is set. Before, `cargo` would compile such dependencies "just" non-incrementally while, with this PR, it will also set the number of CGUs to the number of CPU cores. Otherwise compiling those dependencies might take significantly longer (because of more expensive optimizations and less multi-threading) than compiling them incrementally -- which is what we wanted to avoid in the first place.